<%@ page pageEncoding='UTF-8'%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:set var="contextPath" value="#request.get('javax.servlet.forward.context_path')" scope="request" />

<div id="patient-edit-form-container" class="form-container">
	<form id="patient-edit-form" class="edit-form patient-form" action="${contextPath}/patient/update" method="post">
		<input type="hidden" name="guiPatient.userId" value="${guiPatient.userId}" />
			<fieldset>
				<legend>Update Patient</legend>
				<label>Name<em class="text-alert">*</em></label>
                  <div class="input-control text">
                  	<input type="text" name="guiPatient.name" value="${guiPatient.name}" placeholder="input text" required/>
                      <button class="btn-clear"></button>
</div>
                  <label>Type</label>
                  <div>
                  	<input type="hidden" name="guiPatient.type" value="PATIENT"/>
                      <div class="input-control text">
					<input type="text" value="" placeholder="Patient" disabled/>
					<button class="btn-clear"></button>
	</div>
</div>
<label>Date Of Birth</label>
<div>
	<div id="dob-picker" class="input-control text" data-role="datepicker" data-date='${guiPatient.dobString}' data-format='yyyy-mm-dd'>
		<input type="text" name="guiPatient.dobString" value="${guiPatient.dobString}">
		<div class="btn-date"></div>
	</div>
</div>
                  <label>Gender</label>
<div>
	<div class="input-control radio default-style" data-role="input-control">
		<label>
		<s:if test="%{guiPatient.male}">
			<input type="radio" name="guiPatient.gender" value="MALE" checked="checked"/>
		</s:if>
		<s:else>
			<input type="radio" name="guiPatient.gender" value="MALE"/>
		</s:else>
		<span class="check"></span> Male
		</label>
	</div>
	<div class="input-control radio default-style" data-role="input-control">
		<label>
		<s:if test="%{guiPatient.female}">
			<input type="radio" name="guiPatient.gender" value="FEMALE" checked="checked"/>
		</s:if>
		<s:else>
			<input type="radio" name="guiPatient.gender" value="FEMALE"/>
		</s:else>
			<span class="check"></span> Female
		</label>
	</div>
</div>    
                  <div>
                  	<input type="submit" value="Update" class="primary" />
                      <a href="${contextPath}" class="button info">Cancel</a>
                      <a href="${contextPath}/userlogin/edit?id=${guiPatient.userId}" class="place-right">Edit Login</a>
                      <br clear="all"/>
                  </div>
  			</fieldset>
  		</form>
</div> 